package edu.upf.grupoe.p2ppicture.SearchEngine.implementations;

import edu.upf.grupoe.p2ppicture.SearchEngine.interfaces.DescriptionContent;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * This class represents a description of a content and the URL where it is allocated
 */

public class DescriptionContentImpl implements DescriptionContent, Serializable{

    private List<String> Description = new ArrayList<String> ();
    private String URL = "";
    /**
     * This method sets a content location URL
     * @param URL String
     */
    public void setURL(String URL) {
        this.URL = URL;
    }
    /**
     * This method sets a list of keywords which describe the content
     * @param Description List<String>
     */
    public void setDescription(List<String> Description) {
        this.Description = Description;
    }
    /**
     * This method returns a content description URL
     * @return String
     */
    public String getURL() {
        return this.URL;
    }
    /**
     * This method returns a content description list of String
     * @return List<String>
     */
    public List<String> getDescription() {
        return this.Description;
    }
    /**
     * Description Content constructor
     * @param URL String
     * @param Description List<String>
     */
    public DescriptionContentImpl(String URL, List<String> Description){
        //transform URL to java capable if it is a windows system
        String nURL = URL;
//        if (File.separator.equals("\\")) {
//            nURL = nURL.replace("\\", "\\"+"\\");
//        }
        this.Description = Description;
        this.URL = nURL;
    }
}
